type Constructor = new (...args: any[]) => {}

//装饰器 test1
function test1(target: Constructor) {
  console.log('test1')
}

//装饰器工厂 test2
function test2() {
  console.log('test2工厂')
  return function (target: Constructor) {
    console.log('test2')
  }
}

//装饰器工厂 test3
function test3() {
  console.log('test3工厂')
  return function (target: Constructor) {
    console.log('test3')
  }
}

//装饰器 test4
function test4(target: Constructor) {
  console.log('test4')
}

@test1
@test2()
@test3()
@test4
class Person {}

// test2工厂
// test3工厂
// test4
// test3
// test2
// test1